<?php

require_once "core/application/models/mrequests/mrequests3.php";

class Mrequests4 extends Mrequests3 {

    private $_query;

    protected function insertNewRequest($from, $toId, $charName, $friendName) {
        /**
         *  добавляем новую запись
         */
        DB::getInstance()->openConnectionToGS();
        $this->_query = "INSERT INTO `personal_requests` (`from`, `toId`, `fromChar`, `toChar`, `date`, `status`, `type`) VALUES ('$from', '$toId', '$charName', '$friendName', NOW(), '0', 'friend')";
        return DB::getInstance()->sql($this->_query);
        DB::getInstance()->closeConnection();
        unset($this->_query);
    }

}

?>
